export default {
	namespaced: true,
	state: {
		homeTop: JSON.parse(uni.getStorageSync('homeTop') || '[]' ),
		categorys: JSON.parse(uni.getStorageSync('categorys') || '[]'),
	},
	mutations: {
		setHomeTop(state, data) {
			try{
				uni.setStorageSync('homeTop', JSON.stringify(data))
				state.homeTop = data
			}catch(e){
				console.log('用户数据错误')
			}
		},
		
		setCategorys(state, data) {
			try{
				uni.setStorageSync('categorys', JSON.stringify(data))
				state.categorys = data
			}catch(e){
				console.log('用户数据错误')
			}
		}
	},
	actions: {
		
	}
}